Enabling Sparse Constant Propagation of Array Elements via Array SSA Form
نویسندگان
چکیده
We present a new static analysis technique based on Array SSA form [6]. Compared to traditional SSA form, the key enhancement in Array SSA form is that it deals with arrays at the element level instead of as monolithic objects. In addition, Array SSA form improves the φ function used for merging scalar or array variables in traditional SSA form. The computation of a φ function in traditional SSA form depends on the program’s control flow in addition to the arguments of the φ function. Our improved φ function (referred to as a Φ function) includes the relevant control flow information explicitly as arguments through auxiliary variables that are called @ variables. The @ variables and Φ functions were originally introduced as run-time computations in Array SSA form. In this paper, we use the elementlevel Φ functions in Array SSA form for enhanced static analysis. We use Array SSA form to extend past algorithms for Sparse Constant propagation (SC) and Sparse Conditional Constant propagation (SCC) by enabling constant propagation through array elements. In addition, our formulation of array constant propagation as a set of data flow equations enables integration with other analysis algorithms that are based on data flow equations.
منابع مشابه
Enhanced Parallelization via Analyses and Transformations on Array SSA Form
Array SSA form is a version of SSA form that captures precise element-level data flow information for array variables. As an example of program analysis using Array SSA form, we presented a conditional constant propagation algorithm that can lead to discovery of a larger set of constants than previous algorithms that analyze only scalar variables [7]. As an example of program transformation usi...
متن کاملVerifying Fast and Sparse SSA-Based Optimizations in Coq
The Static Single Assignment (SSA) form is a predominant technology in modern compilers, enabling powerful and fast program optimizations. Despite its great success in the implementation of production compilers, it is only very recently that this technique has been introduced in verified compilers. As of today, few evidence exist on that, in this context, it also allows faster and simpler optim...
متن کاملThe Hot Path SSA Form: Extending the Static Single Assignment Form for Speculative Optimizations
The Static Single Assignment (SSA) form has been an eminent contribution towards analyzing programs for compiler optimizations. It has been a able to the design of simpler algorithms for existing optimizations, and has facilitated the development of new ones. However, speculative optimizations optimizations targeted towards speeding-up the common cases of a program have not been fortunate enoug...
متن کاملUnified Analysis of Array and Object References in Strongly Typed Languages
We present a simple, unified approach for the analysis and optimization of object field and array element accesses in strongly typed languages, that works in the presence of object references/pointers. This approach builds on Array SSA form [14], a uniform representation for capturing control and data flow properties at the level of array elements. The techniques presented here extend previous ...
متن کاملArray SSA for Explicitly Parallel Programs
The usefulness and applicability of the Static Single Assignment (SSA) framework is undisputed. SSA was originally crafted for sequential programs manipulating scalars, but it has been separately extended to parallel programs on the one hand, and to sequential programs with arrays on the other. In an Array SSA framework, arrays are precisely handled on an element-per-element basis. This paper p...
متن کامل